const db = require('./db')

exports.myPromise = (sql,arr=[])=>{
    return new Promise((resolve,reject)=>{
       db.query(sql,arr,(err,results)=>{
           if(err) reject(err)
           resolve(results)
       })
    })
}
